package com.bcinfo.iccard.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.bcinfo.iccard.model.ComboCardSaleDetail;

public interface ComboCardSaleDetailMapper {
    int deleteByPrimaryKey(Long comboCardSaleId);

    int insert(ComboCardSaleDetail record);

    int insertSelective(ComboCardSaleDetail record);

    ComboCardSaleDetail selectByPrimaryKey(Long comboCardSaleId);

    int updateByPrimaryKeySelective(ComboCardSaleDetail record);

    int updateByPrimaryKey(ComboCardSaleDetail record);
    
    List<ComboCardSaleDetail> selectByPage(@Param("twoDimensionCode") String twoDimensionCode,
            @Param("benginIndex") int benginIndex, @Param("pageSize") int pageSize);

    int selectCountByPage(String twoDimensionCode);
    
    List<ComboCardSaleDetail> selectByExpensive(@Param("comboCardId")long comboCardId,@Param("status") int status,
            @Param("benginIndex") int benginIndex, @Param("pageSize") int pageSize);

    int selectCountByExpensive(@Param("comboCardId")long comboCardId,@Param("status")int status);
    
    ComboCardSaleDetail loadByQrCode(String qrCode);
    
    int account(@Param("saleUserId")Long saleUserId,@Param("opId")Long opId);
    
    List<ComboCardSaleDetail> selectBySaleUserId(@Param("saleUserId")long saleUserId,@Param("status") int status,
            @Param("benginIndex") int benginIndex, @Param("pageSize") int pageSize);

    int selectCountBySaleUserId(@Param("saleUserId")long saleUserId,@Param("status")int status);

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2013-12-23-下午2:18:39<br/>
     * <p>
     * @param saleUserId
     * @param status
     * @return   
     * 
     */
    float findALLAccountBySaleUserId(@Param("saleUserId")long saleUserId,@Param("status")int status);
}